You are here: Statements and Functions > Jointly Get
Syntax samples
JOINTLY GET {<quantity>} <resource>
{,<priority>}
{AND or OR {<quantity>} <resource> {,<priority>}}
JOINTLY GET 3 Res1,5
JOINTLY GET 2 Res1 OR 3 Res2
JOINTLY GET Res1,3 AND (Res2 OR Res3)
JOINTLY GET 2 Res(Attribute1)
Captures a specified number of resources when that number of resources is available. When capturing multiple resources, none of the resources will be captured until all are available. If the entity already possesses one or more of the requested resources, the entity will still try to capture additional units of the specified resources.
Location processing, downtime, move, and shift logic.
Components
<quantity>
The number of resources to get. A value of zero is ignored and values less than zero return an error. This numeric expression is evaluated and truncated every time the JOINTLY GET statement is encountered.
<resource >
The name of the resource to JOINTLY GET. RES() can be substituted for the resource name.
<priority>
When multiple entities request a resource, the requests will be filled in order of priority. This expression should be a number between 0 and 999.
Example
In the following example (which also demonstrates the FREE statement) EntA arrives at Loc1 for a multi-step process. Because the first step of the process uses Res1 and Res2 simultaneously, a JOINTLY GET statement is issued to ensure that both resources are available before the process begins. The resources are then freed independently.
Process Table
Entity |
Location |
Operation (min) |
---|---|---|
EntA |
Loc1 |
JOINTLY GET Res1 AND Res 2 WAIT N(4.5,.2) FREE Res1 WAIT L(3.4,.23) FREE Res2 |
Routing Table
Blk |
Output |
Destination |
Rule |
Move Logic |
---|---|---|---|---|
1 |
EntA |
Loc2 |
FIRST 1 |
MOVE FOR 1 |
GET and USE.